	
	//Google map object
	var map;
	var geocoder;
	function initMap() {
  		navigator.geolocation.getCurrentPosition(function(position){
	  		var coords = position.coords;
	  		var latlng = new google.maps.LatLng(coords.latitude,coords.longitude);
	  		var myOptions = {
	  			zoom : 14,
	  			center : latlng,
	  			mapTypeId : google.maps.MapTypeId.ROADMAP
	  		};
	  		map = new google.maps.Map(document.getElementById("mapDiv"),myOptions);
	  		var marker = new google.maps.Marker({
	  			position : latlng,
	  			map : map
	  		});
	  		var infowindow = new google.map.InfoWindow({
	  			content : "current place"
	  		});
	  		infowindow.open(map,marker);
	  	});
  		geocoder = new google.maps.Geocoder();
  	}
	//show the place you search
	function showAddress() {
		//get the address
	    var address = document.getElementById("address").value;
	    if (address == "") {
	    	return;
	    }
	    geocoder.geocode( { 'address': address}, function(results, status) {
	      if (status == google.maps.GeocoderStatus.OK) {
	        map.setCenter(results[0].geometry.location);
	        var marker = new google.maps.Marker({
	            map: map,
	            position: results[0].geometry.location,
	            title : address
	        });
	      } else {
	    	  //no result and tip the user
	    	  alert("There is not the palce in the world,please check again!");
	      }
	    });
	  }
